
<template>
  <div class="travel">
    <h3>游戏排行榜</h3>
    <!-- 前三排行榜 -->
    <div class="podium">
        <div :class="item.class" v-for="(item,index) in podium_list" :key="index">
            <img :src="item.srcUrl"/>
            <p>{{ item.title }}</p>
            <button>立即玩</button>
        </div>
    </div>
    <!-- 排行表列表 -->
    <div class="divBox" v-for="(item,index) in game_list" :key="index">
        <div class="items">
            <p class="rank">{{ item.id }}</p>
            <img :src="item.srcUrl"/>
            <div class="gameInfo">
                <p class="title">{{ item.title }}</p>
                <p class="describe">{{ item.describe }}</p>
            </div>
            <button>立即玩</button>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'game',
  data(){
    return{
        podium_list:[
            {id:2,title:'捕鱼达人',class:'second',srcUrl:require('@/assets/images/game/game2.jpg'),describe:'捕鱼赚金币'},
            {id:1,title:'王牌机战',class:'first',srcUrl:require('@/assets/images/game/game1.jpg'),describe:'精彩刺激，等你来战'},
            {id:3,title:'冒险王3ol',class:'third',srcUrl:require('@/assets/images/game/game3.jpg'),describe:'快来一起冒险吧'},
        ],
        game_list:[
            {id:4,title:'金币大富翁',srcUrl:require('@/assets/images/game/game4.jpg'),describe:'草根继承逆袭成富翁'},
            {id:5,title:'天天斗地主真人版',srcUrl:require('@/assets/images/game/game5.jpg'),describe:'专业公正的棋牌竞技游戏'},
            {id:6,title:'萌喵消消乐',srcUrl:require('@/assets/images/game/game6.jpg'),describe:'萌宠消除游戏，给你带来无限欢乐'},
            {id:7,title:'荣耀足球',srcUrl:require('@/assets/images/game/game7.jpg'),describe:'足球巨星为你荣耀而战'},
            {id:8,title:'疯狂酋长',srcUrl:require('@/assets/images/game/game8.jpg'),describe:'酋长归来，重返石器'},
        ],
    }
  },
  created(){

  },
  methods:{

  }
} 
</script>

<style scoped>
.podium{
    width: 350px;
    height: 150px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    position: relative;
}
h3{
    padding: 0 20px;
}
.first{
    width: 100px;
    height: 120px;
    background-color: #f67172;
}
.first button{
    color: #f67172;
    background-color: #fff;
    position: absolute;
    top: 100px;
    left: 128px;
}
.first p{
    color: #fff;
    position: absolute;
    top: 85px;
    left: 144px;
}
.first img{
    border: 5px solid #fff;
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: 145px;
}
.second{
    width: 100px;
    height: 110px;
    background-color: #75c6fe;
}
.second button{
    color: #75c6fe;
    background-color: #fff;
    position: absolute;
    top: 100px;
    left: 10px;
}
.second p{
    color: #fff;
    position: absolute;
    top: 85px;
    left: 25px;
}
.second img{
    border: 5px solid #fff;
    border-radius: 10px;
    position: absolute;
    top: 5px;
    left: 26px;
}
.third{
    width: 100px;
    height: 100px;
    background-color: #f7a463;
}
.third button{
    color: #f7a463;
    background-color: #fff;
    position: absolute;
    top: 100px;
    left: 245px;
}
.third p{
    color: #fff;
    position: absolute;
    top: 85px;
    left: 258px;
}
.third img{
    border: 5px solid #fff;
    border-radius: 10px;
    position: absolute;
    top: 15px;
    left: 260px;
}
.divBox{
    width: 350px;
    height: 60px;
    margin: 0 auto;
    margin-bottom: 20px;
    text-align: left;
    margin-top: 20px;
}
.items{
    display: flex;
    justify-content: space-around;
}
.rank{
    width: 55px;
    height: 55px;
    font-size: 20px;
    color: #8e8e8e;
    margin: 0;
    padding-top: 16px;
    text-align: center;
    vertical-align: middle;
}
img{
    width: 55px;
    height: 55px;
}
.title{
    width: 140px;
    font-size: 14px;
    color: black;
    margin: 8px 0 8px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.describe{
    width: 140px;
    font-size: 12px;
    color: #a1a1a1;
    margin: 0 0 8px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
button{
    width: 70px;
    height: 30px;
    background-color: #5db05a;
    color: #fff;
    border-radius: 20px;
    border: none;
    margin: 12px;
}
.divBox:last-child{
  margin-bottom: 70px;
}
</style>
